<ui:composition 
	xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" 
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:t="http://myfaces.apache.org/tomahawk" 
	template="/pages/template/main-layout-nologin.xhtml">

	<ui:define name="left">
		<h:form  id="loginForm"	prependId="false">
			<p:growl id="messages" life="3000"/>
			
			<p:panel id="pnlLogin" header="#{msgs.login_title}" width="100%">
				<h:panelGrid columns="2" cellpadding="2" columnClasses="width40,width60" width="100%">
					<h:outputLabel value="#{msgs.login_user}" />
					<p:inputText id="username" value="#{loginBean.user.userName}" required="true" label="#{msgs.login_user}"
						style="validator:checkNotNull(#{loginBean.user.userName});width:100%;" maxlength="20" />

					<h:outputLabel value="#{msgs.login_password}" />
					<h:inputSecret id="password" value="#{loginBean.mp.userPwd}" maxlength="10"
						style="validator:checkNotNull(#{msgs.login_password});width:100%;" required="true" label="#{msgs.login_password}"/>

					<h:outputLabel value="#{msgs.login_new_password}" />
					<h:inputSecret id="newpwd" value="#{loginBean.mp.newPwd}" maxlength="10"
						style="validator:checkNotNull(#{msgs.login_new_password});width:100%;" required="true" label="#{msgs.login_new_password}"/>

					<h:outputLabel value="#{msgs.login_confim_password}" />
					<h:inputSecret id="confirmpwd" value="#{loginBean.mp.confimPwd}" maxlength="10"
						required="true"
						style="validator:checkNotNull(#{msgs.login_confim_password});width:100%;submitButton:btnLogin" label="#{msgs.login_confim_password}"/>

				</h:panelGrid>
				<f:facet name="footer">
					<p:commandButton id="btnLogin" icon="ui-icon-person" value="#{msgs.button_login}" ajax="false"
						onmousedown="return validator('loginForm')" action="#{loginBean.savePwdAction}">
					</p:commandButton>
				</f:facet>
			</p:panel>
			<p />
			<p:calendar mode="inline" locale="hr" showButtonPanel="true" navigator="true" style="width:100%" />
		</h:form>
	</ui:define>

	<ui:define name="content">
		<ui:include src="/pages/loginMainPage.xhtml" />
	</ui:define>
</ui:composition>